# encoding: utf-8
__author__ = 'binbin'
__date__ = '2018/10/13 0013 20:26'


from flask_migrate import Migrate,MigrateCommand
from flask_script import Manager
from info import db,get_app
# import pymysql
from info import model

app=get_app('develop')
#让迁移时，app和数据库建立关联
Migrate(app,db)
#创建脚本管理器
manager=Manager(app)
#增加db脚本命令
manager.add_command('db',MigrateCommand)

# pymysql.install_as_MySQLdb()

@app.route('/')
def index():
    return 'Hello Word'


if __name__ == '__main__':
    print(app.url_map)
    manager.run()
